﻿<!DOCTYPE HTML>
<html lang="zh">
<head>
<title>浮点数 - 语法 &amp; 使用 | AutoHotkey v2</title>
<meta name="description" content="The 浮点数 function converts a numeric 字符串 or 整数 value to a floating-point number." />
<meta name="ahk:equiv-v1" content="AutoHotkey.htm" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
<script type="text/javascript">$(function(){0<=window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")&&CaoNiMaDeUc()})</script>
</head>
<body>

<h1>浮点数</h1>
<p>将数字字符串或整数值转换为浮点数.</p>
<pre class="Syntax">FltValue := <span class="func">浮点数</span>(Value)</pre>

<h2 id="Return_Value">返回值</h2>
<p>类型: <a href="../Concepts.htm#numbers">浮点数</a></p>
<p>函数返回将 <em>Value</em> 转换为纯浮点数(<a href="Type.htm">类型名称</a>为 "Float") 的结果, 或 <em>Value</em> 本身(如果它已经是正确的类型).</p>

<h2 id="Remarks">备注</h2>
<p>如果值无法转换, 则抛出异常.</p>
<p>要确定一个值是否可以转换为浮点数, 使用 <a href="Is.htm#number">是否数字</a> 函数.</p>

<h2 id="Related">相关</h2>
<p><a href="Type.htm">类型</a>, <a href="Integer.htm">整数</a>, <a href="String.htm">字符串</a>, <a href="../Concepts.htm#values">值</a>, <a href="../Language.htm#expressions">表达式</a>, <a href="Is.htm">Is 函数</a></p>

</body>
</html>